# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo03
# Description:
# Author:       98745
# Date:         2019/3/10
#-------------------------------------------------------------------------------

import xmltodict
f=open('files/products.xml','rt',encoding='utf-8')
x=f.read()
d=xmltodict.parse(x)
print(d)
f.close()

import pprint
print(d)
pp=pprint.PrettyPrinter(indent=4)
pp.pprint(d)